package com.biz;

import com.actionForm.ProductActionForm;
import com.actionForm.UserActionForm;
import entities.Product;
import entities.Users;

public class ActionFormToBean {
	public Users userActionFormToUserBean(UserActionForm uaf){
		Users u=new Users();
		//u.setUserAccount(uaf.getUserAccount());
		
		u.setPassword(uaf.getPassword());
		u.setName(uaf.getUsername());
		u.setPhone(uaf.getUserTelephone());
		return u;
	}
	public Product productActionFormToProductBean(ProductActionForm form){
		Product p=new Product();
		
		p.setPrice(form.getPrice());
		p.setName(form.getProductName());
		return p;
	}
}
